home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / network / net_co41.zip / netcont_.exe / TESTDISK.BAT < prev   
DOS Batch File  |  1994-02-17  |  3KB  |  69 lines

  1. @ECHO OFF
  2. GOTO START
  3. :EXPLAIN
  4. ECHO ----------------------   TESTDISK.BAT    --------------------------------
  5. ECHO -   Batch programm for calling Net-Control with daily automatically     -
  6. ECHO -   program stop for testing the logical structure of the harddisk.     -
  7. ECHO -                                                                                     -
  8. ECHO -   Only if no error is recognized Net-Control is started again.        -
  9. ECHO -   For testing the logical structure of the harddisk the output of     -
  10. ECHO -   the DOS program CHKDSK is written to a file (TESTDISK.OUT)          -
  11. ECHO -   and this file is compared with a "correct" output of CHKDSK         -
  12. ECHO -   from the file TESTDISK.OK".                                         -
  13. ECHO -   If no differences between these file, which are caused by a         -
  14. ECHO -   corrupted file structure, are noticed, Net-Control will be          -
  15. ECHO -   started again.                                                      -
  16. ECHO -                                                                       -
  17. ECHO -   Before using this batch program you have to write the file          -
  18. ECHO -   TESTDISK.OK by "CHKDSK > TESTDISK.OK"!                              -
  19. ECHO -   And check, that your harddisk is ok now!
  20. ECHO -   Furthermore you have to check, if you have to make special          -
  21. ECHO -   calls before and after CHKDSK. If you are accessing a drive used    -
  22. ECHO -   by a network, this network has to be disabled during CHKDSK runs.   -
  23. ECHO -                                           (C) RzK Doris Köpke 03/93   -
  24. ECHO -------------------------------------------------------------------------
  25. REM This message will only appear, if the file TESTDISK.OK is missing.
  26. ECHO --------------------------------------------------------------
  27. ECHO -      You hav'nt created the file TESTDISK.OK !             -
  28. ECHO --------------------------------------------------------------
  29. PAUSE
  30. GOTO END
  31.  
  32. :START
  33. IF NOT EXIST TESTDISK.OK GOTO EXPLAIN
  34.  
  35. :NC
  36. REM *****************************************************************
  37. REM *** Of course, you may change this point in time 00:30:00 ... ***
  38. REM *****************************************************************
  39. CALL NC-START GO STOP 00:30:00
  40. REM Net-Control stops at 00:30 automatically with ERRORLEVEL 100
  41. IF ERRORLEVEL 100 GOTO T-DISK
  42. REM If Net-Control was stopped by manual input, quit this batch programm:
  43. GOTO END
  44.  
  45. :T-DISK
  46. REM Disable network ?        e.g.:   NW PAUSE
  47. CHKDSK > TESTDISK.OUT
  48. REM Enable network again ?   e.g.:   NW CONTINUE
  49.  
  50. COMP-OUT TESTDISK.OUT TESTDISK.OK
  51. REM Compare output of CHKDSK with "correct" output.
  52. IF ERRORLEVEL 2 GOTO EXPLAIN
  53. REM this means: TESTDISK.OK is missing.
  54. IF ERRORLEVEL 1 GOTO ERROR
  55. GOTO NC
  56.  
  57.  
  58. :ERROR
  59.  
  60. ECHO --------------------------------------------------------------
  61. ECHO -    The structure of this harddisk seems to be corrupted !  -
  62. ECHO --------------------------------------------------------------
  63. ECHO Output of CHKDSK:
  64. ECHO =================
  65. TYPE TESTDISK.OUT
  66. PAUSE
  67.  
  68. :END
  69.